package com.lrs.java.rmi.client;

import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import com.lrs.java.rmi.server.HelloWorld;

public class HelloWorldClient {

	public static void main(String[] args) throws Exception{
		HelloWorld hw = (HelloWorld)Naming.lookup("rmi://localhost:1099/hw");
		
//		Registry registry = LocateRegistry.getRegistry("localhost", 1099);
//		HelloWorld hw = (HelloWorld)registry.lookup("hw");
		
		
		System.out.println(hw.sayHello());
			
	}
}
